package com.sy.simpleegg.room.entity

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.Ignore
import androidx.room.PrimaryKey
import com.sy.simpleegg.platform.BackstagePlatform


@Entity(tableName = "tb_good")
data class GoodEntity(
//    @PrimaryKey(autoGenerate = true) var id: Long = 0,
//    @ColumnInfo(name = "goodId") var packageId: Int = -1,
//    @ColumnInfo(name = "goodName") var packageName: String = "",
//    @ColumnInfo(name = "goodDesc") var packageDesc: Int = 10,
//    @ColumnInfo(name = "goodType") var type: Int = PackageType.NORMAL.ordinal,
//    @ColumnInfo(name = "typeName") var typeName: String = "",
//    @ColumnInfo(name = "amount") var amount: String = "0",
//    @ColumnInfo(name = "money") var money: String = "0",
//    @ColumnInfo(name = "imgUrl") var imgUrl: String = "",
//    @ColumnInfo(name = "enable") var enable: Int = PackageEnable.ENABLE.ordinal,
//    @ColumnInfo(name = "platform") var platform: Int = Platform.DEF_MQTT.ordinal,
//    @ColumnInfo(name = "quantity") var quantity: Int = 0,
//    @ColumnInfo(name = "info") var info: String = "",
//    @ColumnInfo(name = "time") var time: String = ""//yyyyMMddHHmmss
    @PrimaryKey(autoGenerate = true) var id: Long = 0,
    @ColumnInfo(name = "platform") var platform: BackstagePlatform = BackstagePlatform.DEF_MQTT,
    @ColumnInfo(name = "goodDetial") var goodDetial: String = "",
    @ColumnInfo(name = "time") var time: String = ""//yyyy-MM-dd HH:mm:ss
){
    @Ignore()
    constructor(): this(0)
}
